package com.atguigu.srb.core.controller.admin;


import com.atguigu.srb.common.result.R;
import com.atguigu.srb.core.pojo.entity.UserLoginRecord;
import com.atguigu.srb.core.service.UserLoginRecordService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户登录记录表 前端控制器
 * </p>
 *
 * @author fan
 * @since 2021-11-22
 */
@RestController
@RequestMapping("/admin/core/userLoginRecord")

public class AdminUserLoginRecordController {
    @Resource
    private UserLoginRecordService userLoginRecordService;
    @GetMapping("/getLoginRecord/{mobile}")
    public R getLoginRecord(@PathVariable("mobile") String mobile){
        List<UserLoginRecord> loginRecordList = userLoginRecordService.getLoginRecordById(mobile);
        return R.ok().data("loginRecordList",loginRecordList);
    }
}

